package com.ruoyi.eqmonitor.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.eqmonitor.domain.SnCodeRelation;
import com.ruoyi.eqmonitor.mapper.SnCodeRelationMapper;
import com.ruoyi.eqmonitor.service.ISnCodeRelationService;
import org.springframework.stereotype.Service;

@Service
public class SnCodeRelationServiceImpl extends ServiceImpl<SnCodeRelationMapper, SnCodeRelation> implements ISnCodeRelationService {
    @Override
    public SnCodeRelation getBySnCode(String snCode) {
        LambdaQueryWrapper<SnCodeRelation> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(SnCodeRelation::getSnCode, snCode);
        return getOne(queryWrapper);
    }
}
